/**********************************************************************/
/*   ____  ____                                                       */
/*  /   /\/   /                                                       */
/* /___/  \  /                                                        */
/* \   \   \/                                                       */
/*  \   \        Copyright (c) 2003-2009 Xilinx, Inc.                */
/*  /   /          All Right Reserved.                                 */
/* /---/   /\                                                         */
/* \   \  /  \                                                      */
/*  \___\/\___\                                                    */
/***********************************************************************/

/* This file is designed for use with ISim build 0x7708f090 */

#define XSI_HIDE_SYMBOL_SPEC true
#include "xsi.h"
#include <memory.h>
#ifdef __GNUC__
#include <stdlib.h>
#else
#include <malloc.h>
#define alloca _alloca
#endif
static const char *ng0 = "C:/Users/Rohit/Xilinx_workspace/ECE540/Project_2_16bit/proj_2_16bit/MontProd.v";
static int ng1[] = {0, 0};
static unsigned int ng2[] = {1U, 0U};
static unsigned int ng3[] = {2U, 0U};
static unsigned int ng4[] = {4U, 0U};
static int ng5[] = {16, 0};
static unsigned int ng6[] = {64U, 0U};
static unsigned int ng7[] = {8U, 0U};
static unsigned int ng8[] = {16U, 0U};
static unsigned int ng9[] = {32U, 0U};
static int ng10[] = {2, 0};
static int ng11[] = {1, 0};



static void Always_51_0(char *t0)
{
    char t6[8];
    char *t1;
    char *t2;
    char *t3;
    char *t4;
    char *t5;
    char *t7;
    char *t8;
    unsigned int t9;
    unsigned int t10;
    unsigned int t11;
    unsigned int t12;
    unsigned int t13;
    unsigned int t14;
    unsigned int t15;
    unsigned int t16;
    unsigned int t17;
    unsigned int t18;
    unsigned int t19;
    unsigned int t20;
    char *t21;
    char *t22;
    unsigned int t23;
    unsigned int t24;
    unsigned int t25;
    unsigned int t26;
    unsigned int t27;
    char *t28;
    char *t29;

LAB0:    t1 = (t0 + 5080U);
    t2 = *((char **)t1);
    if (t2 == 0)
        goto LAB2;

LAB3:    goto *t2;

LAB2:    xsi_set_current_line(51, ng0);
    t2 = (t0 + 5896);
    *((int *)t2) = 1;
    t3 = (t0 + 5112);
    *((char **)t3) = t2;
    *((char **)t1) = &&LAB4;

LAB1:    return;
LAB4:    xsi_set_current_line(52, ng0);

LAB5:    xsi_set_current_line(53, ng0);
    t4 = (t0 + 2160U);
    t5 = *((char **)t4);
    t4 = ((char*)((ng1)));
    memset(t6, 0, 8);
    t7 = (t5 + 4);
    t8 = (t4 + 4);
    t9 = *((unsigned int *)t5);
    t10 = *((unsigned int *)t4);
    t11 = (t9 ^ t10);
    t12 = *((unsigned int *)t7);
    t13 = *((unsigned int *)t8);
    t14 = (t12 ^ t13);
    t15 = (t11 | t14);
    t16 = *((unsigned int *)t7);
    t17 = *((unsigned int *)t8);
    t18 = (t16 | t17);
    t19 = (~(t18));
    t20 = (t15 & t19);
    if (t20 != 0)
        goto LAB9;

LAB6:    if (t18 != 0)
        goto LAB8;

LAB7:    *((unsigned int *)t6) = 1;

LAB9:    t22 = (t6 + 4);
    t23 = *((unsigned int *)t22);
    t24 = (~(t23));
    t25 = *((unsigned int *)t6);
    t26 = (t25 & t24);
    t27 = (t26 != 0);
    if (t27 > 0)
        goto LAB10;

LAB11:    xsi_set_current_line(56, ng0);
    t2 = (t0 + 3520);
    t3 = (t2 + 56U);
    t4 = *((char **)t3);
    t5 = (t0 + 3360);
    xsi_vlogvar_wait_assign_value(t5, t4, 0, 0, 7, 0LL);

LAB12:    goto LAB2;

LAB8:    t21 = (t6 + 4);
    *((unsigned int *)t6) = 1;
    *((unsigned int *)t21) = 1;
    goto LAB9;

LAB10:    xsi_set_current_line(54, ng0);
    t28 = ((char*)((ng2)));
    t29 = (t0 + 3360);
    xsi_vlogvar_wait_assign_value(t29, t28, 0, 0, 7, 0LL);
    goto LAB12;

}

static void Always_60_1(char *t0)
{
    char t11[8];
    char *t1;
    char *t2;
    char *t3;
    char *t4;
    char *t5;
    char *t6;
    char *t7;
    int t8;
    char *t9;
    char *t10;
    unsigned int t12;
    unsigned int t13;
    unsigned int t14;
    unsigned int t15;
    unsigned int t16;
    unsigned int t17;
    unsigned int t18;
    unsigned int t19;
    unsigned int t20;
    unsigned int t21;
    unsigned int t22;
    unsigned int t23;
    char *t24;
    char *t25;
    unsigned int t26;
    unsigned int t27;
    unsigned int t28;
    unsigned int t29;
    unsigned int t30;
    char *t31;
    char *t32;

LAB0:    t1 = (t0 + 5328U);
    t2 = *((char **)t1);
    if (t2 == 0)
        goto LAB2;

LAB3:    goto *t2;

LAB2:    xsi_set_current_line(60, ng0);
    t2 = (t0 + 5912);
    *((int *)t2) = 1;
    t3 = (t0 + 5360);
    *((char **)t3) = t2;
    *((char **)t1) = &&LAB4;

LAB1:    return;
LAB4:    xsi_set_current_line(61, ng0);

LAB5:    xsi_set_current_line(62, ng0);
    t4 = (t0 + 3360);
    t5 = (t4 + 56U);
    t6 = *((char **)t5);

LAB6:    t7 = ((char*)((ng2)));
    t8 = xsi_vlog_unsigned_case_compare(t6, 7, t7, 7);
    if (t8 == 1)
        goto LAB7;

LAB8:    t2 = ((char*)((ng3)));
    t8 = xsi_vlog_unsigned_case_compare(t6, 7, t2, 7);
    if (t8 == 1)
        goto LAB9;

LAB10:    t2 = ((char*)((ng4)));
    t8 = xsi_vlog_unsigned_case_compare(t6, 7, t2, 7);
    if (t8 == 1)
        goto LAB11;

LAB12:    t2 = ((char*)((ng7)));
    t8 = xsi_vlog_unsigned_case_compare(t6, 7, t2, 7);
    if (t8 == 1)
        goto LAB13;

LAB14:    t2 = ((char*)((ng8)));
    t8 = xsi_vlog_unsigned_case_compare(t6, 7, t2, 7);
    if (t8 == 1)
        goto LAB15;

LAB16:    t2 = ((char*)((ng9)));
    t8 = xsi_vlog_unsigned_case_compare(t6, 7, t2, 7);
    if (t8 == 1)
        goto LAB17;

LAB18:    t2 = ((char*)((ng6)));
    t8 = xsi_vlog_unsigned_case_compare(t6, 7, t2, 7);
    if (t8 == 1)
        goto LAB19;

LAB20:
LAB22:
LAB21:    xsi_set_current_line(94, ng0);
    t2 = ((char*)((ng2)));
    t3 = (t0 + 3520);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 7);

LAB23:    goto LAB2;

LAB7:    xsi_set_current_line(63, ng0);

LAB24:    xsi_set_current_line(64, ng0);
    t9 = ((char*)((ng3)));
    t10 = (t0 + 3520);
    xsi_vlogvar_assign_value(t10, t9, 0, 0, 7);
    goto LAB23;

LAB9:    xsi_set_current_line(67, ng0);

LAB25:    xsi_set_current_line(68, ng0);
    t3 = ((char*)((ng4)));
    t4 = (t0 + 3520);
    xsi_vlogvar_assign_value(t4, t3, 0, 0, 7);
    goto LAB23;

LAB11:    xsi_set_current_line(71, ng0);

LAB26:    xsi_set_current_line(72, ng0);
    t3 = (t0 + 3840);
    t4 = (t3 + 56U);
    t5 = *((char **)t4);
    t7 = ((char*)((ng5)));
    memset(t11, 0, 8);
    t9 = (t5 + 4);
    t10 = (t7 + 4);
    t12 = *((unsigned int *)t5);
    t13 = *((unsigned int *)t7);
    t14 = (t12 ^ t13);
    t15 = *((unsigned int *)t9);
    t16 = *((unsigned int *)t10);
    t17 = (t15 ^ t16);
    t18 = (t14 | t17);
    t19 = *((unsigned int *)t9);
    t20 = *((unsigned int *)t10);
    t21 = (t19 | t20);
    t22 = (~(t21));
    t23 = (t18 & t22);
    if (t23 != 0)
        goto LAB30;

LAB27:    if (t21 != 0)
        goto LAB29;

LAB28:    *((unsigned int *)t11) = 1;

LAB30:    t25 = (t11 + 4);
    t26 = *((unsigned int *)t25);
    t27 = (~(t26));
    t28 = *((unsigned int *)t11);
    t29 = (t28 & t27);
    t30 = (t29 != 0);
    if (t30 > 0)
        goto LAB31;

LAB32:    xsi_set_current_line(75, ng0);
    t2 = ((char*)((ng7)));
    t3 = (t0 + 3520);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 7);

LAB33:    goto LAB23;

LAB13:    xsi_set_current_line(78, ng0);

LAB34:    xsi_set_current_line(79, ng0);
    t3 = ((char*)((ng8)));
    t4 = (t0 + 3520);
    xsi_vlogvar_assign_value(t4, t3, 0, 0, 7);
    goto LAB23;

LAB15:    xsi_set_current_line(82, ng0);

LAB35:    xsi_set_current_line(83, ng0);
    t3 = ((char*)((ng9)));
    t4 = (t0 + 3520);
    xsi_vlogvar_assign_value(t4, t3, 0, 0, 7);
    goto LAB23;

LAB17:    xsi_set_current_line(86, ng0);

LAB36:    xsi_set_current_line(87, ng0);
    t3 = ((char*)((ng4)));
    t4 = (t0 + 3520);
    xsi_vlogvar_assign_value(t4, t3, 0, 0, 7);
    goto LAB23;

LAB19:    xsi_set_current_line(90, ng0);

LAB37:    xsi_set_current_line(91, ng0);
    t3 = ((char*)((ng2)));
    t4 = (t0 + 3520);
    xsi_vlogvar_assign_value(t4, t3, 0, 0, 7);
    goto LAB23;

LAB29:    t24 = (t11 + 4);
    *((unsigned int *)t11) = 1;
    *((unsigned int *)t24) = 1;
    goto LAB30;

LAB31:    xsi_set_current_line(73, ng0);
    t31 = ((char*)((ng6)));
    t32 = (t0 + 3520);
    xsi_vlogvar_assign_value(t32, t31, 0, 0, 7);
    goto LAB33;

}

static void Always_100_2(char *t0)
{
    char t10[8];
    char t18[8];
    char t19[8];
    char t20[8];
    char t25[8];
    char t26[8];
    char *t1;
    char *t2;
    char *t3;
    char *t4;
    char *t5;
    char *t6;
    char *t7;
    int t8;
    char *t9;
    char *t11;
    char *t12;
    char *t13;
    char *t14;
    char *t15;
    char *t16;
    char *t17;
    char *t21;
    char *t22;
    char *t23;
    char *t24;
    char *t27;

LAB0:    t1 = (t0 + 5576U);
    t2 = *((char **)t1);
    if (t2 == 0)
        goto LAB2;

LAB3:    goto *t2;

LAB2:    xsi_set_current_line(100, ng0);
    t2 = (t0 + 5928);
    *((int *)t2) = 1;
    t3 = (t0 + 5608);
    *((char **)t3) = t2;
    *((char **)t1) = &&LAB4;

LAB1:    return;
LAB4:    xsi_set_current_line(101, ng0);

LAB5:    xsi_set_current_line(102, ng0);
    t4 = (t0 + 3040);
    t5 = (t4 + 56U);
    t6 = *((char **)t5);
    t7 = (t0 + 3040);
    xsi_vlogvar_assign_value(t7, t6, 0, 0, 1);
    xsi_set_current_line(103, ng0);
    t2 = (t0 + 3680);
    t3 = (t2 + 56U);
    t4 = *((char **)t3);
    t5 = (t0 + 3680);
    xsi_vlogvar_assign_value(t5, t4, 0, 0, 16);
    xsi_set_current_line(104, ng0);
    t2 = (t0 + 3840);
    t3 = (t2 + 56U);
    t4 = *((char **)t3);
    t5 = (t0 + 3840);
    xsi_vlogvar_assign_value(t5, t4, 0, 0, 16);
    xsi_set_current_line(105, ng0);
    t2 = (t0 + 4000);
    t3 = (t2 + 56U);
    t4 = *((char **)t3);
    t5 = (t0 + 4000);
    xsi_vlogvar_assign_value(t5, t4, 0, 0, 16);
    xsi_set_current_line(106, ng0);
    t2 = (t0 + 3200);
    t3 = (t2 + 56U);
    t4 = *((char **)t3);
    t5 = (t0 + 3200);
    xsi_vlogvar_assign_value(t5, t4, 0, 0, 16);
    xsi_set_current_line(108, ng0);
    t2 = (t0 + 3360);
    t3 = (t2 + 56U);
    t4 = *((char **)t3);

LAB6:    t5 = ((char*)((ng2)));
    t8 = xsi_vlog_unsigned_case_compare(t4, 7, t5, 7);
    if (t8 == 1)
        goto LAB7;

LAB8:    t2 = ((char*)((ng3)));
    t8 = xsi_vlog_unsigned_case_compare(t4, 7, t2, 7);
    if (t8 == 1)
        goto LAB9;

LAB10:    t2 = ((char*)((ng4)));
    t8 = xsi_vlog_unsigned_case_compare(t4, 7, t2, 7);
    if (t8 == 1)
        goto LAB11;

LAB12:    t2 = ((char*)((ng7)));
    t8 = xsi_vlog_unsigned_case_compare(t4, 7, t2, 7);
    if (t8 == 1)
        goto LAB13;

LAB14:    t2 = ((char*)((ng8)));
    t8 = xsi_vlog_unsigned_case_compare(t4, 7, t2, 7);
    if (t8 == 1)
        goto LAB15;

LAB16:    t2 = ((char*)((ng9)));
    t8 = xsi_vlog_unsigned_case_compare(t4, 7, t2, 7);
    if (t8 == 1)
        goto LAB17;

LAB18:    t2 = ((char*)((ng6)));
    t8 = xsi_vlog_unsigned_case_compare(t4, 7, t2, 7);
    if (t8 == 1)
        goto LAB19;

LAB20:
LAB22:
LAB21:    xsi_set_current_line(169, ng0);
    t2 = ((char*)((ng1)));
    t3 = (t0 + 3040);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 1);

LAB23:    goto LAB2;

LAB7:    xsi_set_current_line(109, ng0);

LAB24:    xsi_set_current_line(110, ng0);
    t6 = ((char*)((ng1)));
    t7 = (t0 + 3040);
    xsi_vlogvar_assign_value(t7, t6, 0, 0, 1);
    xsi_set_current_line(111, ng0);
    t2 = ((char*)((ng1)));
    t3 = (t0 + 3200);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 16);
    goto LAB23;

LAB9:    xsi_set_current_line(114, ng0);

LAB25:    xsi_set_current_line(115, ng0);
    t3 = ((char*)((ng1)));
    t5 = (t0 + 3680);
    xsi_vlogvar_assign_value(t5, t3, 0, 0, 16);
    xsi_set_current_line(116, ng0);
    t2 = ((char*)((ng1)));
    t3 = (t0 + 3840);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 16);
    xsi_set_current_line(117, ng0);
    t2 = ((char*)((ng1)));
    t3 = (t0 + 4000);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 16);
    xsi_set_current_line(118, ng0);
    t2 = ((char*)((ng1)));
    t3 = (t0 + 3040);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 1);
    goto LAB23;

LAB11:    xsi_set_current_line(121, ng0);

LAB26:    xsi_set_current_line(122, ng0);
    t3 = ((char*)((ng1)));
    t5 = (t0 + 3040);
    xsi_vlogvar_assign_value(t5, t3, 0, 0, 1);
    goto LAB23;

LAB13:    xsi_set_current_line(126, ng0);

LAB27:    xsi_set_current_line(127, ng0);
    t3 = (t0 + 3680);
    t5 = (t3 + 56U);
    t6 = *((char **)t5);
    t7 = (t0 + 2480U);
    t9 = *((char **)t7);
    t7 = (t0 + 2440U);
    t11 = (t7 + 72U);
    t12 = *((char **)t11);
    t13 = (t0 + 3840);
    t14 = (t13 + 56U);
    t15 = *((char **)t14);
    xsi_vlog_generic_get_index_select_value(t10, 32, t9, t12, 2, t15, 16, 2);
    t16 = (t0 + 2320U);
    t17 = *((char **)t16);
    memset(t18, 0, 8);
    xsi_vlog_unsigned_multiply(t18, 32, t10, 32, t17, 16);
    memset(t19, 0, 8);
    xsi_vlog_unsigned_add(t19, 32, t6, 16, t18, 32);
    t16 = ((char*)((ng10)));
    memset(t20, 0, 8);
    xsi_vlog_unsigned_mod(t20, 32, t19, 32, t16, 32);
    t21 = (t0 + 4000);
    xsi_vlogvar_assign_value(t21, t20, 0, 0, 16);
    xsi_set_current_line(128, ng0);
    t2 = ((char*)((ng1)));
    t3 = (t0 + 3040);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 1);
    goto LAB23;

LAB15:    xsi_set_current_line(138, ng0);

LAB28:    xsi_set_current_line(139, ng0);
    t3 = (t0 + 3680);
    t5 = (t3 + 56U);
    t6 = *((char **)t5);
    t7 = (t0 + 4000);
    t9 = (t7 + 56U);
    t11 = *((char **)t9);
    t12 = (t0 + 2640U);
    t13 = *((char **)t12);
    memset(t10, 0, 8);
    xsi_vlog_unsigned_multiply(t10, 32, t11, 16, t13, 16);
    memset(t18, 0, 8);
    xsi_vlog_unsigned_add(t18, 32, t6, 16, t10, 32);
    t12 = (t0 + 2480U);
    t14 = *((char **)t12);
    t12 = (t0 + 2440U);
    t15 = (t12 + 72U);
    t16 = *((char **)t15);
    t17 = (t0 + 3840);
    t21 = (t17 + 56U);
    t22 = *((char **)t21);
    xsi_vlog_generic_get_index_select_value(t19, 32, t14, t16, 2, t22, 16, 2);
    t23 = (t0 + 2320U);
    t24 = *((char **)t23);
    memset(t20, 0, 8);
    xsi_vlog_unsigned_multiply(t20, 32, t19, 32, t24, 16);
    memset(t25, 0, 8);
    xsi_vlog_unsigned_add(t25, 32, t18, 32, t20, 32);
    t23 = ((char*)((ng10)));
    memset(t26, 0, 8);
    xsi_vlog_unsigned_divide(t26, 32, t25, 32, t23, 32);
    t27 = (t0 + 3680);
    xsi_vlogvar_assign_value(t27, t26, 0, 0, 16);
    xsi_set_current_line(140, ng0);
    t2 = ((char*)((ng1)));
    t3 = (t0 + 3040);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 1);
    goto LAB23;

LAB17:    xsi_set_current_line(159, ng0);

LAB29:    xsi_set_current_line(160, ng0);
    t3 = (t0 + 3840);
    t5 = (t3 + 56U);
    t6 = *((char **)t5);
    t7 = ((char*)((ng11)));
    memset(t10, 0, 8);
    xsi_vlog_unsigned_add(t10, 32, t6, 16, t7, 32);
    t9 = (t0 + 3840);
    xsi_vlogvar_assign_value(t9, t10, 0, 0, 16);
    xsi_set_current_line(161, ng0);
    t2 = ((char*)((ng1)));
    t3 = (t0 + 3040);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 1);
    goto LAB23;

LAB19:    xsi_set_current_line(164, ng0);

LAB30:    xsi_set_current_line(165, ng0);
    t3 = ((char*)((ng11)));
    t5 = (t0 + 3040);
    xsi_vlogvar_assign_value(t5, t3, 0, 0, 1);
    xsi_set_current_line(166, ng0);
    t2 = (t0 + 3680);
    t3 = (t2 + 56U);
    t5 = *((char **)t3);
    t6 = (t0 + 3200);
    xsi_vlogvar_assign_value(t6, t5, 0, 0, 16);
    goto LAB23;

}


extern void work_m_00000000003538913326_0384678165_init()
{
	static char *pe[] = {(void *)Always_51_0,(void *)Always_60_1,(void *)Always_100_2};
	xsi_register_didat("work_m_00000000003538913326_0384678165", "isim/s6efpga_isim_beh.exe.sim/work/m_00000000003538913326_0384678165.didat");
	xsi_register_executes(pe);
}
